Repository navigation
feat(stylelint-config): take values through tokens in strict and add flat-layers config - #220
Merged
dangreen merged 1 commit intoNov 25, 2026
Conversation
…d `flat-layers` config
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #219.
strictis rewritten around tokens, and a newflat-layersconfig keeps each kind of style in the file Flat Layers Design gives it.strictdeclaration-strict-valuecovers colors,fill,stroke, fonts,z-index, paddings, margins, gaps, insets, radii, font size, line height, outline and underline offsets, scroll padding and margin. Each takes a token, a calc of tokens, or a value that needs none, listed per property:currentcolor,transparentand system colors for colors;0,1,autoand percentages for lengths;-2to2forz-index, a local order, since the layers across components are tokens.light-dark()only in custom properties, so a color reads a role.overflow-x,-y,-blockor-inline. The logical autofix turnsoverflow-yintooverflow-block, which Safari 18 drops.composes, since a mixin is a class in the markup.html,:root) keeps its scrollbar's room and its scroll anchoring: nooverflow-anchor,scrollbar-gutteror overflow axes..roottakes noinset,top,right,bottom,leftorz-index, since where a block stands is its consumer's.flat-layers, since they name what its files hold. A project that relied on them instrictaddsflat-layers, whose custom media are named--screen*wherestricthad--media*.flat-layersvariables.css, typed by their name, as--colorTextor--sizeSpace4, with theui-componentskill's types. Hex colors, color functions,cubic-bezier()andsteps()are allowed there alone.@custom-mediaonly inmedia.css, and custom media named--screen*. Mixins may readprefers-color-scheme, for a picture drawn per theme.containerandcontainer-nameonly incontainers.module.css.:globalonly as:global(html):has(.html,:root,bodyanddata-themeonly in the global files:styles.css,globals.css,variables.cssandmixins.module.css.!importantonly in mixins.Base config
length-zero-no-unitleaves custom properties alone:0pxinsidecalc()is a length, and a bare0is not.🤖 Generated with Claude Code